
% ***********************************************************
% ******************* PHYSICS HEADER ************************
% ***********************************************************
% Version 2
%\documentclass[preprint,aps,prl,showpacs,a4paper,unsortedaddress,amsmath,amssymb,byrevtex]{revtex4}
%\documentclass[aps,prl,twocolumn,showpacs,a4paper,unsortedaddress,amsmath,amssymb,byrevtex]{revtex4}
%\bibliographystyle{apsrev}
\documentclass[11pt]{article}
\usepackage{amsmath} % AMS Math Package
\usepackage{amsthm} % Theorem Formatting
\usepackage{amssymb}	% Math symbols such as \mathbb

\usepackage{graphicx} % Allows for eps images
\usepackage{multicol} % Allows for multiple columns

 \usepackage{epstopdf}

% HIGHLIGHT
\usepackage{soul}
\usepackage{xcolor}
% END HIGHLIGHT

\usepackage[latin1]{inputenc}
\usepackage{dcolumn}
\usepackage{bm}
\usepackage{hyperref}
%\usepackage{times}

%\usepackage{cite}

\usepackage{subfigure}

\usepackage[dvips,letterpaper,margin=0.75in,bottom=0.5in]{geometry}
 % Sets margins and page size
\pagestyle{empty} % Removes page numbers
\makeatletter % Need for anything that contains an @ command
\renewcommand{\maketitle} % Redefine maketitle to conserve space
{ \begingroup \vskip 10pt \begin{center} \large {\bf \@title}
	\vskip 10pt \large \@author \hskip 20pt \@date \end{center}
  \vskip 10pt \endgroup \setcounter{footnote}{0} }
\makeatother % End of region containing @ commands
\renewcommand{\labelenumi}{(\alph{enumi})} % Use letters for enumerate
% \DeclareMathOperator{\Sample}{Sample}
\let\vaccent=\v % rename builtin command \v{} to \vaccent{}
\renewcommand{\v}[1]{\ensuremath{\mathbf{#1}}} % for vector
\newcommand{\gv}[1]{\ensuremath{\mbox{\boldmath$ #1 $}}}
% for vectors of Greek letters
\newcommand{\uv}[1]{\ensuremath{\mathbf{\hat{#1}}}} % for unit vector
\newcommand{\abs}[1]{\left| #1 \right|} % for absolute value
\newcommand{\avg}[1]{\left< #1 \right>} % for average
\let\underdot=\d % rename builtin command \d{} to \underdot{}
\renewcommand{\d}[2]{\frac{d #1}{d #2}} % for derivatives
\newcommand{\dd}[2]{\frac{d^2 #1}{d #2^2}} % for double derivatives
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}
% for partial derivatives
\newcommand{\pdd}[2]{\frac{\partial^2 #1}{\partial #2^2}}
% for double partial derivatives
\newcommand{\pdc}[3]{\left( \frac{\partial #1}{\partial #2}
 \right)_{#3}} % for thermodynamic partial derivatives
\newcommand{\ket}[1]{\left| #1 \right>} % for Dirac bras
\newcommand{\bra}[1]{\left< #1 \right|} % for Dirac kets
\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right|
 \left. #2 \vphantom{#1} \right>} % for Dirac brackets
\newcommand{\matrixel}[3]{\left< #1 \vphantom{#2#3} \right|
 #2 \left| #3 \vphantom{#1#2} \right>} % for Dirac matrix elements
\newcommand{\grad}[1]{\gv{\nabla} #1} % for gradient
\let\divsymb=\div % rename builtin command \div to \divsymb
\renewcommand{\div}[1]{\gv{\nabla} \cdot #1} % for divergence
\newcommand{\curl}[1]{\gv{\nabla} \times #1} % for curl
\let\baraccent=\= % rename builtin command \= to \baraccent
\renewcommand{\=}[1]{\stackrel{#1}{=}} % for putting numbers above =
\newtheorem{prop}{Proposition}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\theoremstyle{definition}
\newtheorem{dfn}{Definition}
\theoremstyle{remark}
\newtheorem*{rmk}{Remark}

% ***********************************************************
% ********************** END HEADER *************************
% ***********************************************************

\title{Lancaster Force Field Molecular Dynamics code v0.0 (Please be aware that at the present the calculations are wrong :) }
\author{David Zsolt Manrique}
\date{2009}
\begin{document}


\maketitle
\section{Intorduction}
Lancaster Force Field Molecular Dynamics (lffmd) code is a program that can help generating force field and make molecular dynamics simulation.
\section{Basics of classical force fields}
Classical force field is a classical approximation of the interactions in atomic systems where each atom is considered a point and their dynamics determined by simple classical few-body interaction between them. Let us not the position of the atoms by $\v{r}_i$ and $a=1..N_i$, where $N_i$ is the number of the atoms. In general the force field is the total potential
\begin{equation*}
U=U\left(\v{r}_1,\v{r}_2,\dots,\v{r}_{N_i} \right)
\end{equation*}
Once we have the total potential we are able to find the optimal configuration or we are able to do classical time dependent dynamics, by solving the Newton equations
\begin{equation*}
m_i \v{\ddot{r}}_i = -\frac{\partial}{\partial \v{r}_i }U\left(\v{r}_1,\v{r}_2,\dots,\v{r}_{N_i} \right)
\end{equation*}.
The problem that we do not know the total potential and moreover generally it is a function of $3N_i$ variables.
In order to tackle the problem we assume that we can approximate $U$ by sum of few body-body potentials.
\begin{multline*}
U\left(\v{r}_1,\v{r}_2,\dots,\v{r}_{N_i} \right)\approx
\sum_{i \in I_1} U_i(\v{r}_i) +
\sum_{ <i,j> \in I_2} U_{<i,j>}(\v{r}_i,\v{r}_j) + \\ +
\sum_{ <i,j,k> \in I_3} U_{<i,j,k>}(\v{r}_i,\v{r}_j,\v{r}_k)  
+\sum_{ <i,j,k,l> \in I_4} U_{<i,j,k,l>}(\v{r}_i,\v{r}_j,\v{r}_k,\v{r}_l) + ...
\end{multline*}
where $I_1,I_2,...$ are the set of index pairs,triplets,... with no index repetition. Furthermore we approximate the few body potentials by analytical expressions which depend on few parameters. It is handy to decompose the summation by analytical expression index $T$ and parameters $p$.
\begin{multline*}
U\left(\v{r}_1,\v{r}_2,\dots,\v{r}_{N_i} \right)\approx
\sum_{T \in \mathfrak{T}^1 } \sum_{ p \in P_{T}^1 }  \sum_{i \in T } U_{T}^1 (\v{r}_i; \lambda^p_{T} ) +
\sum_{T \in \mathfrak{T}^2 } \sum_{ p \in P_{T}^2 }  \sum_{(ij) \in T } U_{T}^2 (\v{r}_i,\v{r}_j ; \lambda^p_{T}) + \\ +
\sum_{T \in \mathfrak{T}^3 } \sum_{ p \in P_{T}^3 }  \sum_{(ijk) \in T } U_{T}^3 (\v{r}_i,\v{r}_j,\v{r}_k ; \lambda^p_{T}) + \sum_{T \in \mathfrak{T}^4 } \sum_{ p \in P_{T}^4 }  \sum_{(ijkl) \in T } U_{T}^4 (\v{r}_i,\v{r}_j,\v{r}_k,\v{r}_l ; \lambda^p_{T}) + ...
\end{multline*}
once the expressions are given they may show some invariance for index permutation.
\subsection {One body potential}
Corresponding force for potential $U(\v{r}_i)$.
\begin{equation*}
\v{F}_i= -\frac{\partial}{\partial \v{r}_i } U(\v{r}_i) 
\end{equation*}
\subsection {Pair potential}
Most of the times we need pair potentials that depends on $\abs{\v{r}_i-\v{r}_j} $.
\begin{equation*}
U(\v{r}_i,\v{r}_j) = U(|\v{r}_i-\v{r}_j|)
\end{equation*}
This potential is invariant for $i,j$ swap. Therefore we introduce an equivalence $(i,j) \equiv (j,i)$. The corresponding force
\begin{equation*}
\v{a} = \v{r}_i-\v{r}_j
\end{equation*}
\begin{equation*}
\frac{\partial  a }{\partial \v{r}_i} = \frac{\v{a} }{a} 
\end{equation*}
\begin{equation*}
\frac{\partial  a }{\partial \v{r}_j} = -\frac{\v{a} }{a}
\end{equation*}
\begin{equation*}
\v{F}_i = -\frac{\partial}{\partial \v{r}_i } U(\v{r}_i,\v{r}_j) = -\frac{\partial}{\partial \v{r}_i } U(|\v{r}_i-\v{r}_j|)
= -\frac{\partial  U(a) }{\partial a} \frac{\partial  a }{\partial \v{r}_i }
= -\frac{\partial  U(a) }{\partial a} \frac{ \v{a} } { a } 
\end{equation*}
\begin{equation*}
\v{F}_j = - \v{F}_i 
\end{equation*}
\subsection {Angular potential}
This depends on $\abs{\v{r}_j-\v{r}_i} $, $\abs{\v{r}_j-\v{r}_k} $,  $\angle i,j,k$.
\begin{equation*}
\v{a} = \v{r}_j-\v{r}_i
\end{equation*}
\begin{equation*}
\v{b} = \v{r}_j-\v{r}_k
\end{equation*}
\begin{equation*}
\cos \phi  = \frac{\v{a}\v{b}}{ab}
\end{equation*}
\begin{equation*}
U(\v{r}_i,\v{r}_j,\v{r}_k) = U(\phi,a,b) = A(\phi) S(a) S(b)
\end{equation*}
This potential is invariant for $i,k$ swap. Therefore we introduce an equivalence $(i,j,k) \equiv (k,j,i)$.
Corresponding force
\begin{equation*}
\frac{\partial  a }{\partial \v{r}_i} = -\frac{\v{a} }{a}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\frac{\partial  a }{\partial \v{r}_j} = \frac{\v{a} }{a}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\frac{\partial  a }{\partial \v{r}_k} = \v{0}
\end{equation*}

\begin{equation*}
\frac{\partial  b }{\partial \v{r}_i} = \v{0}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\frac{\partial  b }{\partial \v{r}_j} = \frac{\v{b} }{b}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\frac{\partial  b }{\partial \v{r}_k} = -\frac{\v{b} }{b}
\end{equation*}

\begin{equation*}
\v{F}_n = -\partial_n U(\v{r}_i,\v{r}_j,\v{r}_k) = -\partial_n [ A(\phi) S(a) S(b) ] =
- \partial_n A(\phi)  S(a)S(b)  -A(\phi) \partial_n S(a) S(b)  -A(\phi) S(a) \partial_n S(b)
\end{equation*}

\begin{equation*}
\partial_i S(a) = \frac{\partial S(a)}{\partial a} \frac{\partial  a }{\partial \v{r}_i} 
= -\frac{\partial S(a)}{\partial a} \frac{\v{a} }{a}
\end{equation*}
\begin{equation*}
\partial_k S(b) = \frac{\partial S(b)}{\partial b} \frac{\partial  b }{\partial \v{r}_k}
 = - \frac{\partial S(b)}{\partial b} \frac{\v{b} }{b}
\end{equation*}

\begin{equation*}
\partial_n A(\phi) = \frac{\partial A(\phi)}{\partial \phi} \frac{\partial  \phi }{\partial \v{r}_n}
= -\frac{1}{\sin \phi} \frac{\partial A(\phi)}{\partial \phi} \frac{\partial \cos \phi}{\partial \v{r}_n}
\end{equation*}


\begin{equation*}
\frac{\partial \cos \phi}{\partial \v{r}_n} = \frac{\partial }{\partial \v{r}_n} \frac{\v{a}\v{b}}{ab} =
=  \frac{\partial }{\partial \v{a} } \frac{\v{a}\v{b}}{ab} \frac{\partial \v{a} }{\partial  \v{r}_n }  +  
 \frac{\partial }{\partial \v{b} } \frac{\v{a}\v{b}}{ab} \frac{\partial \v{b} }{\partial  \v{r}_n } 
\end{equation*}

\begin{equation*}
\alpha =  \frac{1}{ab} 
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\beta = \frac{b}{a}
\end{equation*}

\begin{equation*}
\frac{\partial }{\partial \v{a} } \frac{\v{a}\v{b}}{ab} = \alpha \v{b} -\alpha^2\beta \v{a}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\frac{\partial }{\partial \v{b} } \frac{\v{a}\v{b}}{ab} = \alpha \v{a} -\alpha^2\beta^{-1} \v{b}
\end{equation*}

\begin{equation*}
\frac{\partial \cos \phi}{\partial \v{r}_i} = -\alpha \v{b} + \alpha^2\beta \v{a}
\end{equation*}

\begin{equation*}
\frac{\partial \cos \phi}{\partial \v{r}_k} = -\alpha \v{a} +\alpha^2\beta^{-1} \v{b}
\end{equation*}


\begin{equation*}
\v{F}_i =-\frac{1}{\sin \phi} 
\frac{\partial A(\phi)}{\partial \phi}  S(a)S(b)  \frac{\partial \cos \phi}{\partial \v{a}}
+ A(\phi)\frac{\partial S(a)}{\partial a}  S(b)   \frac{\v{a} }{a}
\end{equation*}


\begin{equation*}
\v{F}_k =-\frac{1}{\sin \phi} 
\frac{\partial A(\phi)}{\partial \phi}  S(a)S(b) \frac{\partial \cos \phi}{\partial \v{b}}
+ A(\phi)  S(a) \frac{\partial S(b)}{\partial b} \frac{\v{b} }{b}
\end{equation*}

\begin{equation*}
\v{F}_j = -\v{F}_i-\v{F}_k
\end{equation*}


\subsection {Dihedral potential}
This depends on the dihedral angle
\begin{equation*}
\v{a} = \v{r}_i-\v{r}_j
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{b} = \v{r}_j-\v{r}_k
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{c} = \v{r}_k-\v{r}_l
\end{equation*}

\begin{equation*}
\cos \phi  = \frac{\v{a}\times\v{b} \cdot \v{b}\times\v{c} }{|\v{a}\times\v{b}||\v{b}\times\v{c}|}
\end{equation*}

\begin{equation*}
U(\v{r}_i,\v{r}_j,\v{r}_k,\v{r}_l) = U(\phi)
\end{equation*}
This potential is invariant for $i,j,k,l$ reversing. Therefore we introduce an equivalence $(i,j,k,l) \equiv (l,k,j,i)$.
Corresponding force

\begin{equation*}
\v{F}_n = -\partial_n U(\v{r}_i,\v{r}_j,\v{r}_k,\v{r}_l) = -\partial_n  U(\phi) =
\frac{1}{\sin \phi} \frac{\partial U(\phi)}{\partial \phi} \frac{\partial \cos \phi}{\partial \v{r}_n}
\end{equation*}

\begin{equation*}
\alpha =  \frac{1}{|\v{a}\times\v{b}||\v{b}\times\v{c}|}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\beta = \frac{|\v{b}\times\v{c}|}{|\v{a}\times\v{b}|}
\end{equation*}


\begin{equation*}
\frac{\partial }{\partial \v{a} } \frac{\v{a}\times\v{b} \cdot \v{b}\times\v{c} }{|\v{a}\times\v{b}||\v{b}\times\v{c}|} = \alpha \v{b}\times(\v{b}\times\v{c}) -\alpha^2\beta \v{b}\times(\v{a}\times\v{b})
\end{equation*}

\begin{equation*}
\frac{\partial }{\partial \v{b} } \frac{\v{a}\times\v{b} \cdot \v{b}\times\v{c} }{|\v{a}\times\v{b}||\v{b}\times\v{c}|} = \alpha \left[ \v{c}\times(\v{a}\times\v{b}) + \v{a}\times(\v{c}\times\v{b}) \right] -\alpha^2 
\left[ 
\beta \v{a}\times(\v{b}\times\v{a}) 
+ \beta^{-1}  \v{c}\times(\v{b}\times\v{c}) 
\right ]
\end{equation*}

\begin{equation*}
\frac{\partial }{\partial \v{c} } \frac{\v{a}\times\v{b} \cdot \v{b}\times\v{c} }{|\v{a}\times\v{b}||\v{b}\times\v{c}|} = \alpha \v{b}\times(\v{b}\times\v{a}) -\alpha^2\beta^{-1} \v{b}\times(\v{c}\times\v{b})
\end{equation*}

\begin{equation*}
\v{F}_i = 
\frac{1}{\sin \phi} \frac{\partial U(\phi)}{\partial \phi} \frac{\partial \cos \phi}{\partial \v{a}} \frac{\partial \v{a}}{\partial \v{r}_i} =
\frac{1}{\sin \phi} \frac{\partial U(\phi)}{\partial \phi} \frac{\partial \cos \phi}{\partial \v{a}} 
\end{equation*}

\begin{equation*}
\v{F}_j =
\frac{1}{\sin \phi} \frac{\partial U(\phi)}{\partial \phi} 
\left [ 
\frac{\partial \cos \phi}{\partial \v{a}} \frac{\partial \v{a}}{\partial \v{r}_j} 
+ \frac{\partial \cos \phi}{\partial \v{b}} \frac{\partial \v{b}}{\partial \v{r}_j} 
\right ] = \frac{1}{\sin \phi} \frac{\partial U(\phi)}{\partial \phi}
\left [
 \frac{\partial \cos \phi}{\partial \v{b}}
- \frac{\partial \cos \phi}{\partial \v{a}} 
\right ]
\end{equation*}

\begin{equation*}
\v{F}_l =
\frac{1}{\sin \phi} \frac{\partial U(\phi)}{\partial \phi} \frac{\partial \cos \phi}{\partial \v{c}} \frac{\partial \v{c}}{\partial \v{r}_l} =
-\frac{1}{\sin \phi} \frac{\partial U(\phi)}{\partial \phi} \frac{\partial \cos \phi}{\partial \v{c}}
\end{equation*}

\begin{equation*}
\v{F}_k = - \v{F}_i - \v{F}_j - \v{F}_l
\end{equation*}

\subsection {Inversion potential}
This depends on the inversion angle $\theta$
\begin{equation*}
\v{a} = \v{r}_i-\v{r}_j
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{b} = \v{r}_i-\v{r}_k
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{c} = \v{r}_i-\v{r}_l 
\end{equation*}
\begin{equation*}
\cos \phi  = \abs{\frac{\v{a}\times\v{b} \cdot \v{c} }{|\v{a}\times\v{b}||\v{c}|}}
\end{equation*}
Since the sign depends on the how $\v{a},\v{b},\v{c} $ are rotated we can swap $j$ and $k$ to follow the right hand rule, thus automatically $\v{a}\times\v{b} \cdot \v{c} \geqslant 0$ and the modulus can be removed.
\begin{equation*}
U(\v{r}_i,\v{r}_j,\v{r}_k,\v{r}_l) = U(\theta) 
\end{equation*}
,and  $\phi = \frac{\pi}{2} - \theta$.
This potential is invariant for $j,k$ swapping. Therefore we introduce an equivalence $(i,j,k,l) \equiv (i,k,j,l)$.
Corresponding force

\begin{equation*}
\v{F}_n = -\partial_n U(\v{r}_i,\v{r}_j,\v{r}_k,\v{r}_l) = -\partial_n  U(\theta) =
-\frac{\partial U(\theta)}{\partial \theta}    \frac{\partial \theta }{\partial \v{r}_n } 
= \frac{\partial U(\theta)}{\partial \theta}    \frac{\partial \phi }{\partial \v{r}_n } 
=-\frac{1}{\sin \phi} \frac{\partial U(\theta)}{\partial \theta} \frac{\partial \cos \phi}{\partial \v{r}_n} 
\end{equation*}


\begin{equation*}
\alpha =  \frac{1}{|\v{a}\times\v{b}||\v{c}|}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\beta = \frac{|\v{c}|}{|\v{a}\times\v{b}|}
\end{equation*}



\begin{equation*}
\frac{\partial }{\partial \v{a} } \frac{\v{a}\times\v{b} \cdot \v{c} }{|\v{a}\times\v{b}||\v{c}|} 
= \alpha \v{b}\times\v{c}  - \alpha^2\beta \v{b}\times(\v{a}\times\v{b})
\end{equation*}

\begin{equation*}
\frac{\partial }{\partial \v{b} } \frac{\v{a}\times\v{b} \cdot \v{c} }{|\v{a}\times\v{b}||\v{c}|}
= \alpha \v{c}\times\v{a }  - \alpha^2\beta \v{a}\times (\v{b}\times\v{a})
\end{equation*}

\begin{equation*}
\frac{\partial }{\partial \v{c} } \frac{\v{a}\times\v{b} \cdot \v{c} }{|\v{a}\times\v{b}||\v{c}|}
= \alpha \v{a}\times\v{b}   - \alpha^2\beta^{-1} \v{c}
\end{equation*}


\begin{equation*}
\v{F}_j = -\frac{1}{\sin \phi} \frac{\partial U(\theta)}{\partial \theta} \frac{\partial \cos \phi}{\partial \v{r}_j}
=\frac{1}{\sin \phi} \frac{\partial U(\theta)}{\partial \theta}  \frac{\partial \cos \phi}{\partial \v{a}}
\end{equation*}

\begin{equation*}
\v{F}_k = -\frac{1}{\sin \phi} \frac{\partial U(\phi)}{\partial \phi} \frac{\partial \cos \phi}{\partial \v{r}_k}
=\frac{1}{\sin \phi} \frac{\partial U(\theta)}{\partial \theta}  \frac{\partial \cos \phi}{\partial \v{b}}
\end{equation*}

\begin{equation*}
\v{F}_l = -\frac{1}{\sin \phi} \frac{\partial U(\phi)}{\partial \phi} \frac{\partial \cos \phi}{\partial \v{r}_l}
=\frac{1}{\sin \phi} \frac{\partial U(\theta)}{\partial \theta}  \frac{\partial \cos \phi}{\partial \v{c}}
\end{equation*}

\begin{equation*}
\v{F}_i = - \v{F}_j - \v{F}_k - \v{F}_l
\end{equation*}

\newpage

\subsection {Useful relations}

\begin{equation*}
\v{a}\times(\v{b}\times\v{c}) = \v{b}\cdot\v{a}\v{c}-\v{c}\cdot\v{a}\v{b}
\end{equation*}
\begin{equation*}
(\v{a}\times\v{b})(\v{c}\times\v{d}) = \v{a}\v{c} \cdot \v{b}\v{d} -  \v{b}\v{c} \cdot \v{a}\v{d}
\end{equation*}
\begin{equation*}
\abs{\v{a}\times\v{b}}^2 = (ab)^2-(\v{a}\v{b})^2
\end{equation*}
\begin{equation*}
\v{A} \cdot = \nabla_{\v{a}} \cdot
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{B} \cdot = \nabla_{\v{b}} \cdot
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{C} \cdot = \nabla_{\v{c}} \cdot
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\nabla = \nabla_{\v{r}} \cdot
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\nabla_i = \nabla_{\v{r}_i} \cdot
\end{equation*}

\begin{equation*}
\nabla a = \frac{1}{a} \frac{ \nabla \v{a}\v{a} }{2}
\end{equation*}
\begin{equation*}
\v{A} a = \frac{\v{a}}{a} 
\end{equation*}
\begin{equation*}
\v{A} \v{a}\v{b} = \v{b}  
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{B} \v{a}\v{b} = \v{a}  
\end{equation*}

\begin{equation*}
\nabla \frac{\v{a}\v{b}}{ab} = \frac{1}{ab} \nabla \v{a}\v{b} - \frac{\v{a}\v{b}}{(ab)^2} \nabla (ab)
\end{equation*}
\begin{equation*}
\alpha = \frac{1}{ab} 
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\beta = \frac{b}{a} 
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\cos \phi = \frac{\v{a}\v{b}}{ab}
\end{equation*}
\begin{equation}
\nabla \frac{\v{a}\v{b}}{ab} = \alpha \nabla \v{a}\v{b} - \alpha \cos \phi \nabla (ab)
\end{equation}

\begin{equation*}
\v{A} \frac{\v{a}\v{b}}{ab} = \alpha \v{b} - \alpha \beta \cos \phi \v{a}
\end{equation*}
\begin{equation*}
\v{B} \frac{\v{a}\v{b}}{ab} = \alpha \v{a} - \alpha \beta^{-1} \cos \phi \v{a}
\end{equation*}

\begin{equation}
\nabla \frac{\v{a}\v{b}}{ab} = \alpha \nabla \v{a}\v{b} - \alpha \cos \phi 
\left[ \beta \frac{1}{2}\nabla \v{a}\v{a}   +  \beta^{-1} \frac{1}{2}\nabla \v{b}\v{b} \right]
\end{equation}

\begin{equation*}
\v{A} \v{a}\times\v{b}\cdot\v{c} = \v{b}\times\v{c}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{B} \v{a}\times\v{b}\cdot\v{c} = \v{c}\times\v{a}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{C} \v{a}\times\v{b}\cdot\v{c} = \v{a}\times\v{b}
\end{equation*}

\begin{equation*}
\v{A} \v{a}\times\v{b}\cdot\v{b}\times\v{c} = \v{b}\times(\v{b}\times\v{c})
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{B} \v{a}\times\v{b}\cdot\v{b}\times\v{c} = -(\v{a}\times\v{b})\times\v{c} - \v{a}\times(\v{b}\times\v{c})
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\v{C} \v{a}\times\v{b}\cdot\v{b}\times\v{c} = (\v{a}\times\v{b})\times\v{b}
\end{equation*}

\begin{equation}
\nabla (\v{a}\times\v{b})(\v{a}\times\v{b})  =\nabla (ab)^2- \nabla  (\v{a}\v{b})^2 =
2 ab \nabla ab - 2 \v{a}\v{b} \nabla  \v{a}\v{b}
\end{equation}

\begin{equation*}
\v{A} (\v{a}\times\v{b})(\v{a}\times\v{b})  = 2 b^2 \v{a} - 2 \v{a}\v{b} \cdot \v{b}
\end{equation*}

\begin{equation*}
\v{B} (\v{a}\times\v{b})(\v{a}\times\v{b}) =2 a^2 \v{b} - 2 \v{a}\v{b} \cdot \v{a}
\end{equation*}









\end{document}




\begin{equation*}
\v{A} (\v{a}\times\v{b})\times(\v{b}\times\v{c})  =\v{b} \cdot \v{c}\v{b} - \v{b}\v{b} \cdot \v{c}=
\v{b}\times(\v{b}\times\v{c})
\end{equation*}
\begin{equation*}
\v{B} (\v{a}\times\v{b})\times(\v{b}\times\v{c})  =\v{B} \v{a}\v{b} \cdot \v{b}\v{c} -  \v{B} \v{b}\v{b} \cdot \v{a}\v{c} =  \v{a} \cdot \v{b}\v{c}  + \v{a}\v{b} \cdot\v{c} -  2\v{b} \cdot \v{a}\v{c} =
(\v{a}\times\v{b})\times\v{c} - \v{a}\times(\v{b}\times\v{c})
\end{equation*}
\begin{equation*}
\v{C} (\v{a}\times\v{b})\times(\v{b}\times\v{c})  =\v{a}\v{b} \cdot \v{b} -  \v{b}\v{b} \cdot \v{a} =
-(\v{a}\times\v{b})\times\v{b}
\end{equation*}


\begin{equation*}
\frac{\partial  c }{\partial \v{r}_i} = -\frac{\v{c} }{c}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\frac{\partial  c }{\partial \v{r}_j} = \frac{\v{c} }{c}
\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,
\frac{\partial  c }{\partial \v{r}_k} = \v{0}
\end{equation*}































